package com.scoy.honeymei.base;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.scoy.honeymei.R;

import butterknife.ButterKnife;

/**
 * @ClassName: BLazyFragment$
 * @Description:
 * @Author: GaoZhan
 * @CreateDate: 2019/10/10/0010$ 下午 14:36$
 * @UpdateUser: 更新者
 * @UpdateDate: 2019/10/10/0010$ 下午 14:36$
 * @UpdateRemark: 更新内容
 */
public class BLazyFragment extends BaseFragment{

    private Context mContext;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_cart, null, false);

        mContext = getContext();

        initNormal();

        isFirst = true;
        if (getUserVisibleHint()) {
            lazyLoad();
            isFirst = false;
        }
        return view;
    }

    private Boolean isFirst = false;

    @Override
    public void setUserVisibleHint(boolean isVisibleToUser) {
        super.setUserVisibleHint(isVisibleToUser);
        if (isFirst && isVisibleToUser) {
            lazyLoad();
            isFirst = false;
        }
    }

    private void lazyLoad() {


    }

    @Override
    public void initNormal() {

    }

}
